package Thread;
//死锁 第一种
// 一个对象加了多把锁
public class Dom20 {
    private static int count;
    public static void main(String[] args) throws InterruptedException {
        Thread T=new Thread(()->{
            Object local=new Object();
            for (int i = 0; i < 5000; i++) {
                synchronized (local){
                    synchronized (local){
                        count++;
                    }
                }
            }
        });
        T.start();
        T.join();
        System.out.println(count);
    }
}
